#pragma once

#include <string.h>
#include <sstream>
#include <iomanip>

#include <direct.h>
#include <algorithm>
#include <io.h>

namespace stl_test
{
    void test(double value)
    {
        std::ostringstream stream;
        stream << std::fixed << std::setprecision(4) << std::setw(16) << std::setfill('*') << value ;
        std::cout << stream.str() << std::endl;
    }

    void test2()
    {
        std::string str = "======== BeginOfTab ========";
        size_t index = str.find('=');
        index = str.find('x');
        if (index == str.npos)
        {
            index = 0;
        }
        index = str.find_last_of('=');
        
    }

    void test3()
    {
        std::string cell{ "     361605.0000      0.0000      0.0000      0.0000" };
        std::vector<std::string> cellSet;
        std::stringstream  stream(cell.c_str());
        
        char separator = ' ';
        while (std::getline(stream, cell, separator)) 
        { 
            cellSet.emplace_back(cell); 
        }
        for  (auto var : cellSet)
        {
            std::cout << var << std::endl;
        }
    }
    
}
